home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
Documents
/
NeXTAnswers
/
objc.29
< prev
next >
Wrap
Text File
|
1992-02-06
|
1KB
|
46 lines
{\rtf0\ansi{\fonttbl\f1\fnil Times-Roman;\f2\fmodern Courier;\f0\fswiss Helvetica;}
\paperw13040
\paperh9540
\margl120
\margr120
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f1\b0\i0\ul0\fs28 objc window server\
\
Q: When can I download PostScript code to the Window Server? Can I use the
\b +initialize
\b0 methods for factory objects?\
\
A: Object class
\b +initialize
\b0 methods cannot download PostScript code to the Window Server because they are run before the connection to the Server has been established.
\b Initialize
\b0 messages for classes always get sent before any other messages are delivered, specifically before
\f2\fs24 [Application new]
\f1\fs28 has been executed. But
\f2\fs24 [Application new]
\f1\fs28 is what connects the program to the Server.\
\
A good time to download code to the server is after
\f2\fs24 [Application new]
\f1\fs28 and loading the nib section, but before the application starts running. In your
\b main
\b0 (), after sending the
\b loadNibSection
\b0 method, sent a
\b setUp
\b0 message, like this:\
\
\f2\fs24 [NXApp loadNibSection:"MyNibFile.nib" owner:NXApp];\
[NXGetNamedObject("MyObj", NXApp) setUp];\
\
\f1\b\fs28 setUp
\b0 will be an instance method that downloads PostScript code to the Window Server.\
\
QA29\
\
Valid for 1.0\
Valid for 2.0\
\